﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using KPIS.GERP.GFMS.BLL;
using KPIS.GERP.GFMS.IBLL;
using KPIS.GERP.GFMS.MODEL;

namespace KPIS.GERP.GFMS.APP.App_UI.Forms
{
    public partial class FIM_PaymentPayInPackMultiRqToPq : System.Web.UI.Page
    {
        private IBLL_FIM_MoneyRequests mr = new B_FIM_MoneyRequests();
        private IBLL_FIM_MoneyRequestDtls mrd = new B_FIM_MoneyRequestDtls();
        private IBLL_FIM_Payments pay = new B_FIM_Payments();

        private List<FIM_PaymentPayInPackMulti.PaymentSaveResult> _paymentSaveResult = null;
        
        protected void Page_Load(object sender, EventArgs e)
        {
            _paymentSaveResult = Session["PaymentSaveResult"] as List<FIM_PaymentPayInPackMulti.PaymentSaveResult>;
            
            if (_paymentSaveResult == null)
            {
                Response.Write("No record to display");
                Response.End();
            } 

            LoadRadGrid2();
        }

        protected void LoadRadGrid2()
        {
            RadGrid2.DataSource = _paymentSaveResult.OrderBy(o => string.IsNullOrEmpty(o.ref_no_payment));
            RadGrid2.DataBind();
        }
    }
}